<include file="nav:header"/>
<div class="container-fluid">
    <style>
        .layui-progress-text{
            position: absolute!important;
            top:0;
            left: 0;
        }
    </style>
    <div class="row">
        <include file="Left:left-Common"/>
        <!-- right -->
        <div class="col-md-10 right">
            <div class="page-header" style="margin-right: 15px">
                <h3>{$page_title}</h3>
            </div>
            <div class="col-md-12">
                <div class="btn-group col-md-2 " role="group" aria-label="Large button group">
                    <a onclick="chche()" type="button" class="btn btn-default">بۇ يەرنى بېسىپ سانداننى زاپاسلىۋېلىڭ </a>
                </div>
                <div class="layui-progress layui-progress-big col-md-10" style="margin-top: 10px;padding: 0;" >
                    <div class="layui-progress-bar layui-bg-red" lay-percent="0%" style="width: 0%;"><span class="layui-progress-text">0%</span></div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    //删除分类
   function beforeSend() {
        layer.msg("سەل ساقلاڭ ، ساندان زاپاسلاۋاتىدۇ.....", {icon: 6,time:100000});
    }
    function chche() {
        $.ajax({
            type:"post",
            url:"{:U('Db/ajax_beifen')}",
            dataType:"json",
            beforeSend:function () {
                beforeSend();
            },
            success:function (phpdata) {
                if(phpdata.status==1){
                    layer.closeAll();
                    var time=null;
                    time= setInterval(sanax,15);
                    function sanax() {
                        i++;
                        $(".layui-progress-bar").css("width",i+'%');
                        $(".layui-progress-bar span").text(i+'%');
                        $(".layui-progress-bar").attr('lay-percent',i+'%');
                        if(i==100){
                            clearInterval(time);
                            layer.alert(phpdata.message+"("+phpdata.id+")", {
                                title:"سېستىما ئەسكەرتىشى",
                                btn:"بىلدىم",
                                icon: 1,
                                skin: 'layer-ext-moon',
                                time:10000
                            });
                        }
                    }
                }
            }
        })

    }

    $(function () {
        $('.classifys').hover(function () {
            $(this).addClass('info');
        },function () {
            $(".classifys").removeClass('info');
        })
    })
</script>
<include file="nav:footer"/>